-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
3aa46a4
to
3eac26d
Compare
@larroy Thanks for working on this. Is this PR ready to review or still WIP? |
It's WIP. I'm taking a few days off. Will get back to this after my break. |
@mxnet-label-bot Update [pr-work-in-progress] |
src/mxfeatures.cc
Outdated
class Storage { | ||
public: | ||
Storage(): | ||
feature_bits() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will feature_bits be initialized without explicit init?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, still better to initialize members explicitly for consistency in C++
src/mxfeatures.cc
Outdated
feature_bits.set(JEMALLOC); | ||
#endif | ||
} | ||
bool is_enabled(unsigned feat) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Consistency with enum type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't because of higher level language ergonomics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const?
You could add the dev lists discussion link to the description. |
Thanks for the PR. It's a very useful proposal and improvement. |
47f4d56
to
07d19a5
Compare
cadf83e
to
7aff860
Compare
@mxnet-label-bot Update [pr-awaiting-review] |
@stsukrov not sure what you mean. |
6eee62e
to
061d81b
Compare
7d77150
to
ba356cf
Compare
@mxnet-label-bot update [pr-awaiting-merge] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide usage details? Maybe example inputs and outputs of running it?
@aaronmarkham where would you suggest to add this? you mean as a documentation? The unit tests show how to use it. We need to build on top of this feature for selecting tests at runtime, so there will be more usage examples. |
I could have just randomly tried executing the scripts but I wanted to know, in advance, what should be run to make them work and what to expect to see if they did work. Then I'd know if it didn't work, or if it did. |
Did you see the provided unit test? |
* Prototype for runtime feature detection * Includes from diamond to quotes * Add CPU feature and BLAS flavour flags * Add BLAS flavour and CPU SSE and AVX flags * MXNET_USE_LAPACK * Fix C++ linting errors * Expose runtime feature detection in the public C API and in the Python API * Refactor Storage -> FeatureSet * Refine documentation * Add failure case * Fix pylint * Address CR comments
* Prototype for runtime feature detection * Includes from diamond to quotes * Add CPU feature and BLAS flavour flags * Add BLAS flavour and CPU SSE and AVX flags * MXNET_USE_LAPACK * Fix C++ linting errors * Expose runtime feature detection in the public C API and in the Python API * Refactor Storage -> FeatureSet * Refine documentation * Add failure case * Fix pylint * Address CR comments
* Prototype for runtime feature detection * Includes from diamond to quotes * Add CPU feature and BLAS flavour flags * Add BLAS flavour and CPU SSE and AVX flags * MXNET_USE_LAPACK * Fix C++ linting errors * Expose runtime feature detection in the public C API and in the Python API * Refactor Storage -> FeatureSet * Refine documentation * Add failure case * Fix pylint * Address CR comments
Description
It would be good to have runtime feature detection, for example to know if we were compiled with OPENCV, LAPACK, some tests fail when MXNet is not compiled with some feature or another.
This is a proposal for a runtime feature detection mechanism that would expose how the library was compiled and what features are available.
It also grooms some of the feature flags which were not uniformly set in base.h
See related discussion in dev:
https://lists.apache.org/thread.html/19fe1da67551f9a199ec85dbb9c894e65c205d5fdd6764509e6e41ed@%3Cdev.mxnet.apache.org%3E
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments